<template>
  <div class="fanHui">
    <van-icon
      class="bot"
      name="back-top"
      color="#ee0a24"
      size="30"
      @click="clickIcon"
    />
  </div>
</template>

<script>
export default {
  methods: {
    clickIcon() {
      window.scrollTo({
        behavior: "smooth",
        top: 0,
      });
    },
  },
};
</script>

<style lang="less" scoped>
.fanHui {
  .bot {
    position: fixed;
    right: 5%;
    bottom: 10%;
    z-index: 99;
  }
}
</style>
